﻿using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace LaserAutoTest.Application.Models
{
    public class UserModel : ViewModelBase
    {
        private string _jobNumber;
        public string JobNumber
        {
            get { return _jobNumber; }
            set
            {
                SetProperty(ref _jobNumber, value);
                OnPropertyChanged(new PropertyChangedEventArgs(nameof(Display)));
            }
        }



        private string _password;
        public string Password
        {
            get { return _password; }
            set
            {
                SetProperty(ref _password, value);
            }
        }

        private Visibility _display = Visibility.Collapsed;
        public Visibility Display
        {
            get
            {
                if (JobNumber == "admin")
                    _display = Visibility.Visible;
                else
                    _display = Visibility.Collapsed;
                return _display;
            }
            set { SetProperty(ref _display, value); }
        }
    }
}
